package com.sxm.yiwei.activitis;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.sxm.yiwei.MainActivity;
import com.sxm.yiwei.R;
import com.sxm.yiwei.utils.InternetAddressUtis;

import org.xutils.image.ImageOptions;
import org.xutils.x;

public class MineHelp extends BaseActivity implements View.OnClickListener{

    private ImageView i;
    private ImageView helpback;
    private RelativeLayout yivino;
    private RelativeLayout yiviguanli;
    private RelativeLayout problem;
    private ImageView backmain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mine_help);
        helpback = (ImageView) findViewById(R.id.mine_help_back);
        yivino = (RelativeLayout) findViewById(R.id.mine_yivino);
        yiviguanli = (RelativeLayout) findViewById(R.id.mine_yiviguanli);
        problem = (RelativeLayout) findViewById(R.id.mine_problem);
        backmain = (ImageView) findViewById(R.id.minehelp_backmain);

        backmain.setOnClickListener(this);
        helpback.setOnClickListener(this);
        yiviguanli.setOnClickListener(this);
        yivino.setOnClickListener(this);
        problem.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.minehelp_backmain:

                startActivity(new Intent(MineHelp.this, MainActivity.class));
                AppManager.getAppManager().finishAllActivity();
                break;
            case R.id.mine_help_back:
                finish();
                break;
            case R.id.mine_problem:
                Intent i2 = new Intent(MineHelp.this,WEBXActivity.class);
                i2.putExtra("from","problem");
                i2.putExtra("url", InternetAddressUtis.XPROBLEM);
                startActivity(i2);
                break;
            case R.id.mine_yivino:
                Intent i = new Intent(MineHelp.this,WEBXActivity.class);
                i.putExtra("from","no");
                i.putExtra("url", InternetAddressUtis.XYIVINO);
                startActivity(i);
                break;
            case R.id.mine_yiviguanli:
                Intent i1 = new Intent(MineHelp.this,WEBXActivity.class);
                i1.putExtra("from","guanli");
                i1.putExtra("url", InternetAddressUtis.XYIVIGUANLI);
                startActivity(i1);
                break;
        }
    }
}
